package com.linkai.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.linkai.dto.AdminBproductExcelDto;

import java.util.Map;

/**
 * @Author yamon
 * @Date 2020-12-24 16:55
 * @Description
 * @Version 1.0
 */
public class ExcelListener extends AnalysisEventListener<AdminBproductExcelDto> {
    @Override
    public void invoke(AdminBproductExcelDto adminBproductExcelDto, AnalysisContext analysisContext) {
        System.out.println("******"+adminBproductExcelDto);
    }

    /**
     * 读取表头
     * @param headMap
     * @param context
     */
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头"+headMap);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
